<script>
    function onTimestampClick(event, timestamp) {
        let pages = document.getElementsByClassName("page");
        for (let i = 0; i < pages.length; i++) {
            pages[i].style.display = "none";
        }
        let selectedPage = document.getElementsByClassName("page " + timestamp)[0];
        selectedPage.style.display = "block";
        document.getElementById("dashboard-0_" + timestamp).click();

    }
    function onTabClick(event, id, id2) {
        // Get all elements with class="tabcontent" and hide them
        let tabcontents = document.getElementsByClassName("tabcontent");
        for (let i = 0; i < tabcontents.length; i++) {
            tabcontents[i].style.display = "none";
        }
        // Get all elements with class="tab" and remove the class "active"
        let tabs = document.getElementsByClassName("tab");
        for (let i = 0; i < tabs.length; i++) {
            tabs[i].className = tabs[i].className.replaceAll(" active", "");
        }
        // Show the current tab, and add an "active" class to the button that opened the tab
        document.getElementById(id).style.display = "block";
        event.currentTarget.className += " active";
        document.getElementById(id2).className += " active";
    }
    let timestamp = document.getElementById("dropdown").value;
    onTimestampClick(null, timestamp);
    document.getElementsByTagName("html")[0].style.visibility = "visible";
</script>
